/* 使用uni.showToast函数 */
function Toast(msg, icon) {
  uni.showToast({
    title: msg,
    icon: icon,
  });
}

/* 封装showToast */
const showToast = {
  success: msg => Toast(msg, "success"),
  error: msg => Toast(msg, "error"),
  loading: msg => Toast(msg, "loading"),
  none: msg => Toast(msg, "none"),
};

export { showToast };
